//
//  GoodsAttributeCell.m
//  CenturyCity
//
//  Created by beisheng03 on 2017/12/15.
//  Copyright © 2017年 beisheng. All rights reserved.
//

#import "GoodsAttributeCell.h"

@interface GoodsAttributeCell ()

@property (weak, nonatomic) IBOutlet UILabel *textLabel;
@end

@implementation GoodsAttributeCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    self.contentView.backgroundColor = [UIColor whiteColor];
    
    self.textLabel.font = MYFONT(14);
    
    self.textLabel.textColor = darkGray;
    
    self.textLabel.layer.masksToBounds = YES;
    
    self.textLabel.layer.cornerRadius = 2;
    
    self.textLabel.layer.borderColor = darkGray.CGColor;
    
    self.textLabel.layer.borderWidth = 0.6;
    
    


}

- (void)setModel:(GoodsSpecSubModel *)model{
    _model = model;
    self.textLabel.text = _model.spec_value_name;
    
    if ([_model.isSelect isEqualToString:@"0"]) {
        
        self.textLabel.layer.borderColor = darkGray.CGColor;
        self.textLabel.textColor = darkGray;

    } else {
        
        self.textLabel.layer.borderColor = [UIColor redColor].CGColor;
        self.textLabel.textColor = [UIColor redColor];


    }
    
    
}




@end
